import request from '@/utils/request.js'
// 查询文件夹列表
export function getFolderList(params) {
  return request({
    url: '/manage/folder/list',
    method: 'get',
    params
  })
}
// 导出文件夹信息
export function exportFolder(params) {
  return request({
    url: '/manage/folder/export',
    method: 'post',
    params
  })
}
// 获取文件夹信息详情//接口被去掉了
// export function getFolderDetail(id) {
//   return request({
//     url: `/manage/folder/${id}`,
//     method: 'get'
//   })
// }
// 新增文件夹信息
export function addFolder(data) {
  return request({
    url: '/manage/folder/add',
    method: 'post',
    data
  })
}
// 文件夹重命名
export function renameFolder(data) {
  return request({
    url: `/manage/folder/edit`,
    method: 'put',
    data
  })
}
// 彻底删除文件夹
export function deleteFolderThoroughDelete(ids) {
  return request({
    url: `/manage/folder/thoroughDelete/${ids}`,
    method: 'delete'
  })
}
// 删除文件夹信息(回收站)
export function deleteFolder(ids) {
  return request({
    url: `/manage/folder/${ids}`,
    method: 'delete'
  })
}
// 删除文件夹信息
export function delFolder(ids) {
  return request({
    url: `/manage/folder/${ids}`,
    method: 'delete'
  })
}
// 恢复文件夹
export function recoverFolder(id) {
  return request({
    url: `/manage/folder/restore/${id}`,
    method: 'put'
  })
}
// 置顶文件夹
export function topFolder(data) {
  return request({
    url: `/manage/folder/topFolderById`,
    method: 'put',
    data
  })
}
// 取消置顶文件夹
// export function cancelTopFolder(id) {
//   return request({
//     url: `/manage/folder/cancelTop/${id}`,
//     method: 'put',
//   })
// }
//查询文件夹成员配置信息列表
export function getFolderMemberList(params) {
  return request({
    url: '/manage/folderMember/list',
    method: 'get',
    params
  })
}
//修改文件夹成员配置信息
export function editFolderMember(data) {
  return request({
    url: '/manage/folderMember/edit',
    method: 'put',
    data
  })
}
//---------------------------------------------------------------------------------------------------------------------------------------------------------
//查询知识库文件夹管理列表
export function getKnowledgeList(params) {
  return request({
    url: '/manage/knowledgeFolder/list',
    method: 'get',
    params
  })
}
// 获取个人知识库文件夹列表
export function getMyKnowledgeList(params) {
  return request({
    url: '/manage/knowledgeFolder/getPersonageKnowledgeFolderList',
    method: 'get',
    params
  })
}
// 查询知识库文件夹中文档列表
export function getKnowledgeDocList(params) {
  return request({
    url: '/manage/knowledgeDocument/list',
    method: 'get',
    params
  })
}
// 新增至知识库
export function newAKnowledge(data) {
  return request({
    url: '/manage/knowledgeFolder/add',
    method: 'post',
    data
  })
}
// 获取知识库文件夹管理详细信息
export function getKnowledgeInfo(id) {
  return request({
    url: `/manage/knowledgeFolder/getInfo/${id}`,
    method: 'get'
  })
}
// 修改知识库文件夹管理(重命名)
export function renameKnowledge(data) {
  return request({
    url: '/manage/knowledgeFolder/edit',
    method: 'put',
    data
  })
}
// 置顶或取消置顶知识库文件夹
export function topKnowledge(data) {
  return request({
    url: '/manage/knowledgeFolder/topFolderById',
    method: 'put',
    data
  })
}
// 删除知识库文件夹
export function deleteKnowledge(ids) {
  return request({
    url: `/manage/knowledgeFolder/delete/${ids}`,
    method: 'delete'
  })
}
//---------------------------------------------------------------------------------------------------------------------------------------------------------
//查询回收站列表
export function getRecycleBinList(params) {
  return request({
    url: '/manage/folder/recycleBinList',
    method: 'get',
    params
  })
}
